package cn.mini.mybatis.mybatis.builder;

import cn.mini.mybatis.mybatis.session.Configuration;
import cn.mini.mybatis.mybatis.typehandler.TypeAliasRegistry;

public abstract class BaseBuilder {
    protected Configuration configuration;

    protected final TypeAliasRegistry typeAliasRegistry;
    public BaseBuilder(Configuration configuration) {
        this.configuration = configuration;
        this.typeAliasRegistry = this.configuration.getTypeAliasRegistry();
    }


    public Configuration getConfiguration() {
        return configuration;
    }

    protected Class<?> resolveAlias(String alias) {
        return typeAliasRegistry.resolveAlias(alias);
    }
}
